const { mongoose } = require('../module/db')

const Schema = mongoose.Schema

const MenuType = {
    key: String,
    title: String,
    icon: String,
    badge: String,
    type:String,
    navigate:String,
     menu_id: {
        type: mongoose.Types.ObjectId,
        ref: 'menu'
    }
}

const MenuModel = mongoose.model('menu', new Schema(MenuType), 'menu')

module.exports = MenuModel
